package com.jeebey.mybatis.query;

import com.jeebey.mybatis.annotation.GeneratedPosition;
import com.jeebey.mybatis.annotation.GeneratedStrategy;

/**
 * @since 1.0
 * @author <a href="mailto:84961426@qq.com">JuST4iT</a>
 * @version $Id: Parameter.java Feb 18, 2016 6:06:48 PM $
 */

public class Parameter {
	private String field;
	private Object value;

	private Class<?> javaType;
	private String generator;
	private String keyColumn;
	private String keyProperty;
	private boolean generated;
	private Class<?> referType;
	private GeneratedStrategy strategy;
	private GeneratedPosition location;

	public Parameter() {
	}

	public Parameter(String field, Object value) {
		this.field = field;
		this.value = value;
	}

	public Parameter(String field, Object value, String keyColumn, String keyProperty, GeneratedStrategy strategy,
			String generator, GeneratedPosition location, boolean generated, Class<?> javaType,Class<?>referType) {
		this.field = field;
		this.value = value;

		this.javaType = javaType;
		
		this.strategy = strategy;
		this.location = location;
		this.generated = generated;
		this.generator = generator;
		this.keyColumn = keyColumn;
		this.referType = referType;
		this.keyProperty = keyProperty;
	}

	public boolean isGenerated() {
		return generated;
	}

	public void setGenerated(boolean generated) {
		this.generated = generated;
	}

	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}

	public GeneratedPosition getLocation() {
		return location;
	}

	public void setLocation(GeneratedPosition location) {
		this.location = location;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	public String getKeyColumn() {
		return keyColumn;
	}

	public void setKeyColumn(String keyColumn) {
		this.keyColumn = keyColumn;
	}

	public String getKeyProperty() {
		return keyProperty;
	}

	public void setKeyProperty(String keyProperty) {
		this.keyProperty = keyProperty;
	}

	public GeneratedStrategy getStrategy() {
		return strategy;
	}

	public void setStrategy(GeneratedStrategy strategy) {
		this.strategy = strategy;
	}

	public String getGenerator() {
		return generator;
	}

	public void setGenerator(String generator) {
		this.generator = generator;
	}

	public Class<?> getJavaType() {
		return javaType;
	}

	public void setJavaType(Class<?> javaType) {
		this.javaType = javaType;
	}

	public Class<?> getReferType() {
		return referType;
	}

	public void setReferType(Class<?> referType) {
		this.referType = referType;
	}

}
